Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
human-signals
Advanced tools
The human-signals npm package is a library that provides human-readable descriptions and other information for system signals. It allows developers to understand and handle system signals in a more user-friendly way.
Getting human-readable information for signals
This feature allows you to retrieve information about a signal, such as its description, by using its name. The example code retrieves information about the SIGINT signal.
const { signalsByName } = require('human-signals');
const info = signalsByName['SIGINT'];
console.log(info);
Listing all signals with their information
This feature provides a list of all system signals along with their human-readable descriptions and other relevant information. The example code logs all available signals to the console.
const { signals } = require('human-signals');
console.log(signals);
The signal-exit package is used to run a callback when a process exits, including when it exits due to a signal. It is similar to human-signals in that it deals with system signals, but it focuses on executing callbacks rather than providing human-readable information.
Human-friendly process signals.
This is a map of known process signals with some information about each signal.
Unlike
os.constants.signals
this includes:
Please reach out if you're looking for a Node.js API or CLI engineer (11 years of experience). Most recently I have been Netlify Build's and Netlify Plugins' technical lead for 2.5 years. I am available for full-time remote positions.
import { signalsByName, signalsByNumber } from 'human-signals'
console.log(signalsByName.SIGINT)
// {
// name: 'SIGINT',
// number: 2,
// description: 'User interruption with CTRL-C',
// supported: true,
// action: 'terminate',
// forced: false,
// standard: 'ansi'
// }
console.log(signalsByNumber[8])
// {
// name: 'SIGFPE',
// number: 8,
// description: 'Floating point arithmetic error',
// supported: true,
// action: 'core',
// forced: false,
// standard: 'ansi'
// }
npm install human-signals
This package works in Node.js >=18.18.0.
This is an ES module. It must be loaded using
an import
or import()
statement,
not require()
. If TypeScript is used, it must be configured to
output ES modules,
not CommonJS.
Type: object
Object whose keys are signal names and values are signal objects.
Type: object
Object whose keys are signal numbers and values are signal objects.
Type: object
Signal object with the following properties.
Type: string
Standard name of the signal, for example 'SIGINT'
.
Type: number
Code number of the signal, for example 2
. While most number
are
cross-platform, some are different between different OS.
Type: string
Human-friendly description for the signal, for example
'User interruption with CTRL-C'
.
Type: boolean
Whether the current OS can handle this signal in Node.js using
process.on(name, handler)
.
The list of supported signals is OS-specific.
Type: string
Enum: 'terminate'
, 'core'
, 'ignore'
, 'pause'
, 'unpause'
What is the default action for this signal when it is not handled.
Type: boolean
Whether the signal's default action cannot be prevented. This is true
for
SIGTERM
, SIGKILL
and SIGSTOP
.
Type: string
Enum: 'ansi'
, 'posix'
, 'bsd'
, 'systemv'
, 'other'
Which standard defined that signal.
For any question, don't hesitate to submit an issue on GitHub.
Everyone is welcome regardless of personal background. We enforce a Code of conduct in order to promote a positive and inclusive environment.
This project was made with ❤️. The simplest way to give back is by starring and sharing it online.
If the documentation is unclear or has a typo, please click on the page's Edit
button (pencil icon) and suggest a correction.
If you would like to help us fix a bug or add a new feature, please check our guidelines. Pull requests are welcome!
Thanks go to our wonderful contributors:
ehmicky 💻 🎨 🤔 📖 | electrovir 💻 | Felix Zedén Yverås 💻 ⚠️ |
FAQs
Human-friendly process signals
The npm package human-signals receives a total of 25,595,281 weekly downloads. As such, human-signals popularity was classified as popular.
We found that human-signals demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.